package com.yzy.soft.common.persistence.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
* @author Yinzhiyuan
* @date 2018-12-18 16:14:35
*/
//@Entity
@TableName(value="metadata_table")
public class MetadataTable extends Model<MetadataTable> {

    /**
     *编码
     */
    @TableId(type= IdType.AUTO)
    private Integer id;

    /**
     *列注释
     */
    private String name;

    /**
     *列注释
     */
    private String engine;

    /**
     *列注释
     */
    private String version;

    /**
     *列注释
     */
    @TableField(value="row_format")
    private String rowFormat;

    /**
     *列注释
     */
    private String rows;

    /**
     *列注释
     */
    @TableField(value="avg_row_length")
    private String avgRowLength;

    /**
     *列注释
     */
    @TableField(value="data_length")
    private String dataLength;

    /**
     *列注释
     */
    @TableField(value="max_data_length")
    private String maxDataLength;

    /**
     *列注释
     */
    @TableField(value="index_length")
    private String indexLength;

    /**
     *列注释
     */
    @TableField(value="data_free")
    private String dataFree;

    /**
     *列注释
     */
    @TableField(value="auto_increment")
    private String autoIncrement;
    /**
     *列注释
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value="create_time",fill= FieldFill.INSERT)
    private Date createTime;

    /**
     *列注释
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value="update_time",fill= FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     *列注释
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value="check_time",fill= FieldFill.INSERT_UPDATE)
    private Date checkTime;

    /**
     *列注释
     */
    private String collation;

    /**
     *列注释
     */
    private String checksum;

    /**
     *列注释
     */
    @TableField(value="create_options")
    private String createOptions;

    /**
     *列注释
     */
    private String comment;

    /**
     *创建人
     */
    @TableField(value="createperson",fill= FieldFill.INSERT_UPDATE)
    private String createperson;

    /**
     *修改人
     */
    @TableField(value="makerperson",fill= FieldFill.INSERT_UPDATE)
    private String makerperson;

    /**
     *创建时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value="createtime",fill= FieldFill.INSERT)
    private Date createtime;

    /**
     *最后一次修改时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value="lastupdatetime",fill= FieldFill.INSERT_UPDATE)
    private Date lastupdatetime;

    /**
     *创建目的
     */
    private String makegoal;

    /**
     *最后一次修改目的
     */
    private String lastupdategoal;

    /**
     *状态
     */
    private Integer userflag;

    /**
     *
     */
    private String deleteflag;

    /**
     *
     */
    private String spareflag1;

    /**
     *
     */
    private String spareflag2;

    /**
     *
     */
    private String spareflag3;

    /**
     *
     */
    private String spareflag4;

    /**
     *
     */
    private String spareflag5;

    /**
     *
     */
    private String sparefield1;

    /**
     *
     */
    private String sparefield2;

    /**
     *
     */
    private String sparefield3;

    /**
     *
     */
    private String sparefield4;

    /**
     *
     */
    private String sparefield5;

    /**
     *
     */
    private String sparefield6;

    /**
     *数据库编码
     */
    @TableField(value="database_id")
    private Integer databaseId;

    @TableField(exist=false)
    private List<MetadataColumn> columns;


    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEngine() {
        return this.engine;
    }

    public void setEngine(String engine) {
        this.engine = engine;
    }

    public String getVersion() {
        return this.version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getRowFormat() {
        return this.rowFormat;
    }

    public void setRowFormat(String rowFormat) {
        this.rowFormat = rowFormat;
    }

    public String getRows() {
        return this.rows;
    }

    public void setRows(String rows) {
        this.rows = rows;
    }

    public String getAvgRowLength() {
        return this.avgRowLength;
    }

    public void setAvgRowLength(String avgRowLength) {
        this.avgRowLength = avgRowLength;
    }

    public String getDataLength() {
        return this.dataLength;
    }

    public void setDataLength(String dataLength) {
        this.dataLength = dataLength;
    }

    public String getMaxDataLength() {
        return this.maxDataLength;
    }

    public void setMaxDataLength(String maxDataLength) {
        this.maxDataLength = maxDataLength;
    }

    public String getIndexLength() {
        return this.indexLength;
    }

    public void setIndexLength(String indexLength) {
        this.indexLength = indexLength;
    }

    public String getDataFree() {
        return this.dataFree;
    }

    public void setDataFree(String dataFree) {
        this.dataFree = dataFree;
    }

    public String getAutoIncrement() {
        return this.autoIncrement;
    }

    public void setAutoIncrement(String autoIncrement) {
        this.autoIncrement = autoIncrement;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getCheckTime() {
        return this.checkTime;
    }

    public void setCheckTime(Date checkTime) {
        this.checkTime = checkTime;
    }

    public String getCollation() {
        return this.collation;
    }

    public void setCollation(String collation) {
        this.collation = collation;
    }

    public String getChecksum() {
        return this.checksum;
    }

    public void setChecksum(String checksum) {
        this.checksum = checksum;
    }

    public String getCreateOptions() {
        return this.createOptions;
    }

    public void setCreateOptions(String createOptions) {
        this.createOptions = createOptions;
    }

    public String getComment() {
        return this.comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getCreateperson() {
        return this.createperson;
    }

    public void setCreateperson(String createperson) {
        this.createperson = createperson;
    }

    public String getMakerperson() {
        return this.makerperson;
    }

    public void setMakerperson(String makerperson) {
        this.makerperson = makerperson;
    }

    public Date getCreatetime() {
        return this.createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getLastupdatetime() {
        return this.lastupdatetime;
    }

    public void setLastupdatetime(Date lastupdatetime) {
        this.lastupdatetime = lastupdatetime;
    }

    public String getMakegoal() {
        return this.makegoal;
    }

    public void setMakegoal(String makegoal) {
        this.makegoal = makegoal;
    }

    public String getLastupdategoal() {
        return this.lastupdategoal;
    }

    public void setLastupdategoal(String lastupdategoal) {
        this.lastupdategoal = lastupdategoal;
    }

    public Integer getUserflag() {
        return this.userflag;
    }

    public void setUserflag(Integer userflag) {
        this.userflag = userflag;
    }

    public String getDeleteflag() {
        return this.deleteflag;
    }

    public void setDeleteflag(String deleteflag) {
        this.deleteflag = deleteflag;
    }

    public String getSpareflag1() {
        return this.spareflag1;
    }

    public void setSpareflag1(String spareflag1) {
        this.spareflag1 = spareflag1;
    }

    public String getSpareflag2() {
        return this.spareflag2;
    }

    public void setSpareflag2(String spareflag2) {
        this.spareflag2 = spareflag2;
    }

    public String getSpareflag3() {
        return this.spareflag3;
    }

    public void setSpareflag3(String spareflag3) {
        this.spareflag3 = spareflag3;
    }

    public String getSpareflag4() {
        return this.spareflag4;
    }

    public void setSpareflag4(String spareflag4) {
        this.spareflag4 = spareflag4;
    }

    public String getSpareflag5() {
        return this.spareflag5;
    }

    public void setSpareflag5(String spareflag5) {
        this.spareflag5 = spareflag5;
    }

    public String getSparefield1() {
        return this.sparefield1;
    }

    public void setSparefield1(String sparefield1) {
        this.sparefield1 = sparefield1;
    }

    public String getSparefield2() {
        return this.sparefield2;
    }

    public void setSparefield2(String sparefield2) {
        this.sparefield2 = sparefield2;
    }

    public String getSparefield3() {
        return this.sparefield3;
    }

    public void setSparefield3(String sparefield3) {
        this.sparefield3 = sparefield3;
    }

    public String getSparefield4() {
        return this.sparefield4;
    }

    public void setSparefield4(String sparefield4) {
        this.sparefield4 = sparefield4;
    }

    public String getSparefield5() {
        return this.sparefield5;
    }

    public void setSparefield5(String sparefield5) {
        this.sparefield5 = sparefield5;
    }

    public String getSparefield6() {
        return this.sparefield6;
    }

    public void setSparefield6(String sparefield6) {
        this.sparefield6 = sparefield6;
    }

    public Integer getDatabaseId() {
        return this.databaseId;
    }

    public void setDatabaseId(Integer databaseId) {
        this.databaseId = databaseId;
    }

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

    public List<MetadataColumn> getColumns() {
        return columns;
    }

    public void setColumns(List<MetadataColumn> columns) {
        this.columns = columns;
    }

    @Override
    public String toString() {
        return "MetadataTable{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", engine='" + engine + '\'' +
                ", version='" + version + '\'' +
                ", rowFormat='" + rowFormat + '\'' +
                ", rows='" + rows + '\'' +
                ", avgRowLength='" + avgRowLength + '\'' +
                ", dataLength='" + dataLength + '\'' +
                ", maxDataLength='" + maxDataLength + '\'' +
                ", indexLength='" + indexLength + '\'' +
                ", dataFree='" + dataFree + '\'' +
                ", autoIncrement='" + autoIncrement + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", checkTime=" + checkTime +
                ", collation='" + collation + '\'' +
                ", checksum='" + checksum + '\'' +
                ", createOptions='" + createOptions + '\'' +
                ", comment='" + comment + '\'' +
                ", createperson='" + createperson + '\'' +
                ", makerperson='" + makerperson + '\'' +
                ", createtime=" + createtime +
                ", lastupdatetime=" + lastupdatetime +
                ", makegoal='" + makegoal + '\'' +
                ", lastupdategoal='" + lastupdategoal + '\'' +
                ", userflag=" + userflag +
                ", deleteflag='" + deleteflag + '\'' +
                ", spareflag1='" + spareflag1 + '\'' +
                ", spareflag2='" + spareflag2 + '\'' +
                ", spareflag3='" + spareflag3 + '\'' +
                ", spareflag4='" + spareflag4 + '\'' +
                ", spareflag5='" + spareflag5 + '\'' +
                ", sparefield1='" + sparefield1 + '\'' +
                ", sparefield2='" + sparefield2 + '\'' +
                ", sparefield3='" + sparefield3 + '\'' +
                ", sparefield4='" + sparefield4 + '\'' +
                ", sparefield5='" + sparefield5 + '\'' +
                ", sparefield6='" + sparefield6 + '\'' +
                ", databaseId=" + databaseId +
                ", columns=" + columns +
                '}';
    }
}